const jsonServer = require('json-server')
const server = jsonServer.create()
const router = require('./router')
const db = require('./db')()

router(server)
const jsonRouter = jsonServer.router(db)
server.use('/api', jsonRouter)
server.listen(9000, () => {
  console.log('监听端口: ===> listening on port 9000')
})
